package com.l.d.app.library.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Created by linde on 2017/04/19.
 * <p/>
 */

public class CalendarUtil {
    public static int MILLIS_SECOND = 1000;
    public static int MILLIS_MINUTE = 60 * MILLIS_SECOND;
    public static int MILLIS_HOUR = 60 * MILLIS_MINUTE;
    public static long MILLIS_A_DAY = 24 * MILLIS_HOUR;

    public static String stringFormat(long timeMillis, String format, Locale locale) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format, locale == null ? Locale.getDefault() : locale);
        Date date = new Date(timeMillis);
        System.out.print(System.currentTimeMillis());
        return dateFormat.format(date);
    }
}
